"""
60 - ORM Flask_SQLAlchemy 模型及表的创建
"""

from flask import Flask
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.debug = True
# mysql://myname:123456@127.0.0.1:3306/mydatabase  连接基本形式： 别名+驱动://用户名:密码@主机:端口/数据库
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///./db/pms.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config['SQLALCHEMY_ECHO'] = True

db = SQLAlchemy(app)


@app.route('/')
def index():
    return 'Index'


if __name__ == '__main__':
    app.run()
